<?php

declare(strict_types=1);

namespace App\Model;

use Hyperf\Database\Model\SoftDeletes;
use Hyperf\DbConnection\Model\Model;

class Playlet extends Model
{
    use SoftDeletes;

    protected ?string $table = 'playlet';

    const STATUS_SHOW = 1;
    const STATUS_HIDE = 0;

    public static $finishStatus = [1 => '完结',0 => '未完结'];

    public static $payType = [1 => '免费',2 => '章节付费'];

    public function company()
    {
        return $this->hasOne(Company::class, 'id', 'company_id')->withTrashed()->select('id','name');
    }
}
